package cn.net.isir.service;

import cn.net.isir.core.BasicService;
import cn.net.isir.core.SetBasicDao;
import cn.net.isir.dao.PermissionDao;
import cn.net.isir.entity.Permission;
import cn.net.isir.entity.User;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class PermissionService extends BasicService<Permission> {
    @SetBasicDao
    @Resource
    private PermissionDao permissionDao;

    /**
     * 根据用户信息查询权限列表
     *
     * @param user 用户信息
     * @return 权限列表
     */
    public List<Permission> selectPermissionListByUserId(User user) {
        return permissionDao.selectPermissionListByUserId(user);
    }

}
